package com.cooge.jiexi;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public class magoo {

	public static void main(String[] args) throws Exception {
		
		String link = "http://mobile.api.hunantv.com/v2/video/getSource?osType=android&videoId=1689767&appVersion=4.4.3&osVersion=5.1.1&ticket=&osType=android&channel=qq";
		
			String html = NetUtil.getHtml(link);
			
			JSONObject json = JSONObject.parseObject(html);
			JSONObject data = json.getJSONObject("data");
			
			JSONArray videoSources =  data.getJSONArray("videoSources");
			
			for(int i = 0;i<videoSources.size();i++){
				JSONObject video = videoSources.getJSONObject(i);
				
				String url = video.getString("url");
				String pp = NetUtil.getHtml(url);
				System.out.println(pp);
				
			}

	}

}
